package com.ruoyi.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.purchase.domain.Purchase;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 黄佳成
* @description 针对表【po_purchase】的数据库操作Mapper
* @createDate 2022-01-06 09:55:16
* @Entity com.ruoyi.purchase.domain.Purchase
*/
public interface PurchaseMapper extends BaseMapper<Purchase> {
    /**
     * 查询所有的采购信息
     * @param purchase
     * @return
     */
    public List<Purchase> findAllBrand(Purchase purchase);

    /**
     * 查询所有在审核状态的采购信息
     * @param purchase
     * @return
     */
    public List<Purchase> queryListByStatus(Purchase purchase);

    /**
     * 批量删除采购单信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteUserByIds(String[] ids);

    /**
     * 提交审核
     * userid 审核人id
     */
    public void updatPurchase(@Param("userid") Integer userid,@Param("bid") String bid);

    /**
     * 根据purId查询采购单对象
     * @param purId
     * @return
     */
    public Purchase findPurchase(String purId);

    /**
     * 更新采购单信息
     * @param purchase
     * @return
     */
    public boolean updatePurchaseby(Purchase purchase);
}




